Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial implementation of std::dump #1

Merged
merged 17 commits into from
Dec 10, 2024
Merged

Add initial implementation of std::dump #1

merged 17 commits into from
Dec 10, 2024

Conversation

foonathan
Copy link
Collaborator

No description provided.

@foonathan foonathan force-pushed the impl branch 2 times, most recently from b189fdf to c442ff7 Compare September 20, 2024 05:08
.github/workflows/ci_tests.yml Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
namespace beman::dump {
namespace detail {
template <std::size_t N>
constexpr auto format_string = []{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A documentation comment for this variable template would be nice.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temporary TODO comment added

src/beman/dump/dump.cpp Outdated Show resolved Hide resolved
target_link_libraries(beman.dump.tests
PRIVATE beman::dump GTest::gtest GTest::gtest_main)

gtest_add_tests(beman.dump.tests "" AUTO)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need some kind of test that verifies that the dump() call is implemented correctly. One way this could be done is to:

  1. Write a short CMake script that runs a program that calls dump(), pipes it to a file, and verifies its output
  2. Register the CMake execution as a test using add_test

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defered to #2

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is almost trivial to redirect std::cout though, I don't see the need to write to a file, but we can discuss this later.

src/beman/dump/dump.t.cpp Outdated Show resolved Hide resolved
Full runable examples can be found in `examples/` (e.g., [./examples/identity_as_default_projection.cpp.cpp](./examples/identity_as_default_projection.cpp.cpp)).

## Building beman.example
## Building beman.dump
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a ## Usage section demonstrating dump() calls.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added TODO

.github/workflows/ci_tests.yml Show resolved Hide resolved
examples/CMakeLists.txt Show resolved Hide resolved
examples/basic.cpp Outdated Show resolved Hide resolved
@wusatosi
Copy link
Member

I was given green light to take over this PR by email.

I will try to clear up this PR and get it merged this week.

Thanks for your contribution @foonathan !

wusatosi and others added 10 commits November 12, 2024 13:38
Co-authored-by: David Sankel <[email protected]>
Co-authored-by: David Sankel <[email protected]>
Co-authored-by: David Sankel <[email protected]>
Co-authored-by: David Sankel <[email protected]>
Co-authored-by: David Sankel <[email protected]>
Co-authored-by: David Sankel <[email protected]>
@wusatosi wusatosi mentioned this pull request Nov 12, 2024
@wusatosi
Copy link
Member

To prioritize merging first, I have resolved all trivial suggestions.

Summary of TODOs:

@wusatosi wusatosi requested a review from neatudarius November 12, 2024 18:51
@wusatosi
Copy link
Member

Would suggest prioritizing merging this PR to all reviewers.

@wusatosi wusatosi requested a review from inbal2l November 15, 2024 19:00
@foonathan
Copy link
Collaborator Author

FYI, the underlying proposal was rejected; cplusplus/papers#2034 (comment)

@neatudarius neatudarius merged commit 3f93699 into main Dec 10, 2024
2 checks passed
@neatudarius
Copy link
Member

PR was merged because this library will be deprecated. No future work in this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants